package demo3;
import java.util.ArrayList;
import java.util.List;

public class ListElementOperation {
    public static void main(String[] args) {
        List<Integer> numbers = new ArrayList<>();
        for (int i = 1; i <= 10; i++) {
            numbers.add(i);
        }
        numbers.removeIf(n -> n % 3 == 0);
        System.out.println("移除能被 3 整除的数后：" + numbers);
    }
}